package com.ymatou.iapi.userservice.testcase;

import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.login.parameter.AliUserRequestDtoBean;
import com.ymatou.iapi.login.parameter.SinaWeiBoUserRequestDtoBean;
import com.ymatou.iapi.login.parameter.WeiXinUserRequestDtoBean;
import com.ymatou.iapi.userservice.parameter.CheckMobileCanBindThirdPartyUserDtoBean;
import com.ymatou.iapi.userservice.parameter.req.CreateUserReq;
import com.ymatou.iapi.userservice.service.CheckMobileCanBindThirdPartyUserDtoCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.JUserCallService;
import com.ymttest.utils.TestDataManager;
/**
*检查手机号是否可以绑定第三方账号
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_CheckMobileCanBindThirdPartyUserDto{
	private static CheckMobileCanBindThirdPartyUserDtoBean checkmobilecanbindthirdpartyuserdtoBean;
	private static CheckMobileCanBindThirdPartyUserDtoCall checkmobilecanbindthirdpartyuserdtoCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("检查手机号是否可以绑定第三方账号");
	}

	@Before
	public void caseUp() {
		checkmobilecanbindthirdpartyuserdtoBean=new CheckMobileCanBindThirdPartyUserDtoBean();
		checkmobilecanbindthirdpartyuserdtoCall=new CheckMobileCanBindThirdPartyUserDtoCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(checkmobilecanbindthirdpartyuserdtoCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_001() {
		Logger.start(true,"手机未绑定weixin账号,检查状态100");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String weixinid=TestDataManager.getRandomUUID().toString();
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weixin");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weixinid);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("100", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机未绑定，账号未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_002() {
		Logger.start(true,"手机已绑定当前weixin账号,检查状态112");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String weixinid=TestDataManager.getRandomUUID().toString();
			WeiXinUserRequestDtoBean bean=JUserCallService.initWeiXinUserRequestDtoBean();
			bean.setUnionId(weixinid);
			bean.setMobile(phone);
			JUserCallService.weiXinUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weixin");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weixinid);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("112", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机已绑定，账号已绑定，关联", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_003() {
		Logger.start(true,"手机已绑定非当前weixin账号,检查状态111");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String weixinid=TestDataManager.getRandomUUID().toString();
			String weixinidb=TestDataManager.getRandomUUID().toString();
			WeiXinUserRequestDtoBean bean=JUserCallService.initWeiXinUserRequestDtoBean();
			bean.setUnionId(weixinid);
			bean.setMobile(phone);
			JUserCallService.weiXinUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weixin");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weixinidb);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("111", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机已绑定，账号未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_004() {
		Logger.start(true,"手机未绑定weixin账号但是绑定了ali账号,检查状态100");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String aliid=TestDataManager.getRandomUUID().toString();
			String weixinidb=TestDataManager.getRandomUUID().toString();
			
			AliUserRequestDtoBean bean = JUserCallService.initAliUserRequestDtoBean();
			bean.setSAliUserId(aliid);
			bean.setMobile(phone);
			JUserCallService.aliUserRequestDto(bean);
			
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weixin");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weixinidb);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("100", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机未绑定，账号未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_005() {
		Logger.start(true,"weixin账号已绑定手机,检查状态1");
		try {
			String phone =TestDataManager.getPhoneNum();
			String weixinid=TestDataManager.getRandomUUID().toString();
			WeiXinUserRequestDtoBean bean=JUserCallService.initWeiXinUserRequestDtoBean();
			bean.setUnionId(weixinid);
			bean.setMobile(phone);
			JUserCallService.weiXinUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weixin");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weixinid);
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("1", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("账号已绑定手机", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_006() {
		Logger.start(true,"weixin账号未绑定手机,检查状态0");
		try {
			String weixinid=TestDataManager.getRandomUUID().toString();
			
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weixin");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weixinid);
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("0", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("账号未绑定手机", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_007() {
		Logger.start(true,"手机未绑定第三方weixin账号,检查状态10");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weixin");
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("10", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("手机未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_008() {
		Logger.start(true,"手机已绑定第三方weixin账号,检查状态11");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String weixinid=TestDataManager.getRandomUUID().toString();
			WeiXinUserRequestDtoBean bean=JUserCallService.initWeiXinUserRequestDtoBean();
			bean.setUnionId(weixinid);
			bean.setMobile(phone);
			JUserCallService.weiXinUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weixin");
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("11", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("手机已绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_009() {
		Logger.start(true,"手机未绑定weibo账号,检查状态100");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String weiboid=TestDataManager.getRandomUUID().toString();
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weibo");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weiboid);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("100", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机未绑定，账号未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_010() {
		Logger.start(true,"手机已绑定当前weibo账号,检查状态112");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String weiboid=TestDataManager.getRandomUUID().toString();
			
			
			SinaWeiBoUserRequestDtoBean bean=JUserCallService.initSinaWeiBoUserRequestDtoBean();
			bean.setSWeiboUserId(weiboid);
			bean.setMobile(phone);
			JUserCallService.sinaWeiBoUserRequestDto(bean);
			
			
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weibo");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weiboid);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("112", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机已绑定，账号已绑定，关联", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_011() {
		Logger.start(true,"手机已绑定非当前weibo账号,检查状态111");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String weiboid=TestDataManager.getRandomUUID().toString();
			String weiboidb=TestDataManager.getRandomUUID().toString();
			SinaWeiBoUserRequestDtoBean bean=JUserCallService.initSinaWeiBoUserRequestDtoBean();
			bean.setSWeiboUserId(weiboid);
			bean.setMobile(phone);
			JUserCallService.sinaWeiBoUserRequestDto(bean);
			
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weibo");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weiboidb);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("111", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机已绑定，账号未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_012() {
		Logger.start(true,"手机未绑定weibo账号但是绑定了ali账号,检查状态100");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String aliid=TestDataManager.getRandomUUID().toString();
			String weiboidb=TestDataManager.getRandomUUID().toString();
			AliUserRequestDtoBean bean = JUserCallService.initAliUserRequestDtoBean();
			bean.setSAliUserId(aliid);
			bean.setMobile(phone);
			JUserCallService.aliUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weibo");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weiboidb);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("100", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机未绑定，账号未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_013() {
		Logger.start(true,"weibo账号已绑定手机,检查状态1");
		try {
			String phone =TestDataManager.getPhoneNum();
			String weiboid=TestDataManager.getRandomUUID().toString();
			SinaWeiBoUserRequestDtoBean bean=JUserCallService.initSinaWeiBoUserRequestDtoBean();
			bean.setSWeiboUserId(weiboid);
			bean.setMobile(phone);
			JUserCallService.sinaWeiBoUserRequestDto(bean);
			
			
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weibo");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weiboid);
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("1", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("账号已绑定手机", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_014() {
		Logger.start(true,"weibo账号未绑定手机,检查状态0");
		try {
			String weiboid=TestDataManager.getRandomUUID().toString();
			
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weibo");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weiboid);
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("0", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("账号未绑定手机", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_015() {
		Logger.start(true,"手机未绑定第三方weibo账号,检查状态10");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weibo");
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("10", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("手机未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_016() {
		Logger.start(true,"手机已绑定第三方weibo账号,检查状态11");
		try {
			CreateUserReq cur2 = new CreateUserReq();
			cur2 = JUserCallService.initCreateUserBean(cur2);
			Integer uid2 = JUserCallService.createUserCall(cur2);
			String phone= cur2.getMobile();
			String weiboid=TestDataManager.getRandomUUID().toString();
			SinaWeiBoUserRequestDtoBean bean=JUserCallService.initSinaWeiBoUserRequestDtoBean();
			bean.setSWeiboUserId(weiboid);
			bean.setMobile(phone);
			JUserCallService.sinaWeiBoUserRequestDto(bean);
			
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weibo");
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("11", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("手机已绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_017() {
		Logger.start(true,"手机未绑定Alipay账号,检查状态100");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String Alipayid=TestDataManager.getRandomUUID().toString();
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("Alipay");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(Alipayid);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("100", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机未绑定，账号未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_018() {
		Logger.start(true,"手机已绑定当前Alipay账号,检查状态112");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String Alipayid=TestDataManager.getRandomUUID().toString().replaceAll("-", "_");
			
			AliUserRequestDtoBean bean = JUserCallService.initAliUserRequestDtoBean();
			bean.setSAliUserId(Alipayid);
			bean.setMobile(phone);
			JUserCallService.aliUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("Alipay");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(Alipayid);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("112", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机已绑定，账号已绑定，关联", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_019() {
		Logger.start(true,"手机已绑定非当前Alipay账号,检查状态111");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String Alipayid=TestDataManager.getRandomUUID().toString().replaceAll("-", "_");
			String Alipayidb=TestDataManager.getRandomUUID().toString().replaceAll("-", "_");
			AliUserRequestDtoBean bean = JUserCallService.initAliUserRequestDtoBean();
			bean.setSAliUserId(Alipayid);
			bean.setMobile(phone);
			JUserCallService.aliUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("Alipay");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(Alipayidb);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("111", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机已绑定，账号未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_020() {
		Logger.start(true,"手机未绑定Alipay账号但是绑定了weixin账号,检查状态100");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String weixin=TestDataManager.getRandomUUID().toString();
			String Alipayidb=TestDataManager.getRandomUUID().toString();
			WeiXinUserRequestDtoBean bean=JUserCallService.initWeiXinUserRequestDtoBean();
			bean.setUnionId(weixin);
			bean.setMobile(phone);
			JUserCallService.weiXinUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("Alipay");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(Alipayidb);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("100", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机未绑定，账号未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_021() {
		Logger.start(true,"Alipay账号已绑定手机,检查状态1");
		try {
			String phone =TestDataManager.getPhoneNum();
			String Alipayid=TestDataManager.getRandomUUID().toString().replaceAll("-", "_");
			AliUserRequestDtoBean bean = JUserCallService.initAliUserRequestDtoBean();
			bean.setSAliUserId(Alipayid);
			bean.setMobile(phone);
			JUserCallService.aliUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("Alipay");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(Alipayid);
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("1", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("账号已绑定手机", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_022() {
		Logger.start(true,"Alipay账号未绑定手机,检查状态0");
		try {
			String Alipayid=TestDataManager.getRandomUUID().toString();
			
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("Alipay");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(Alipayid);
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("0", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("账号未绑定手机", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_023() {
		Logger.start(true,"手机未绑定第三方Alipay账号,检查状态10");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("Alipay");
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("10", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("手机未绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_024() {
		Logger.start(true,"手机已绑定第三方Alipay账号,检查状态11");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String Alipayid=TestDataManager.getRandomUUID().toString().replaceAll("-", "_");
			AliUserRequestDtoBean bean = JUserCallService.initAliUserRequestDtoBean();
			bean.setSAliUserId(Alipayid);
			bean.setMobile(phone);
			JUserCallService.aliUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("Alipay");
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("11", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyIsContains("手机已绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_025() {
		Logger.start(false,"缺少必填项失败");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
//			Logger.verifyEquals("错误的请求参数", checkmobilecanbindthirdpartyuserdtoCall.getString("LastErrorMessage"), "验证LastErrorMessage");
			Logger.verifyEquals("100", checkmobilecanbindthirdpartyuserdtoCall.getString("ResponseCode"), "验证ResponseCode");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_026() {
		Logger.start(true,"weixin账号已绑定手机A,使用手机B检查是否能绑定weixin,检查状态101");
		try {
			String phone =TestDataManager.getPhoneNum();
			String phone2 =TestDataManager.getPhoneNum();
			String weixinid=TestDataManager.getRandomUUID().toString();
			WeiXinUserRequestDtoBean bean=JUserCallService.initWeiXinUserRequestDtoBean();
			bean.setUnionId(weixinid);
			bean.setMobile(phone);
			JUserCallService.weiXinUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone2);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weixin");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weixinid);
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("101", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机未绑定，账号已绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_027() {
		Logger.start(true,"weibo账号已绑定手机A,使用手机B检查是否能绑定weixin,检查状态101");
		try {
			String phone =TestDataManager.getPhoneNum();
			String phone2 =TestDataManager.getPhoneNum();
			String weibo=TestDataManager.getRandomUUID().toString();
			SinaWeiBoUserRequestDtoBean bean=JUserCallService.initSinaWeiBoUserRequestDtoBean();
			bean.setSWeiboUserId(weibo);
			bean.setMobile(phone);
			JUserCallService.sinaWeiBoUserRequestDto(bean);
			
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone2);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weibo");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weibo);
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("101", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机未绑定，账号已绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_028() {
		Logger.start(true,"ali账号已绑定手机A,使用手机B检查是否能绑定weixin,检查状态101");
		try {
			String phone =TestDataManager.getPhoneNum();
			String phone2 =TestDataManager.getPhoneNum();
			String Alipayid=TestDataManager.getRandomUUID().toString().replaceAll("-", "_");
			AliUserRequestDtoBean bean = JUserCallService.initAliUserRequestDtoBean();
			bean.setSAliUserId(Alipayid);
			bean.setMobile(phone);
			JUserCallService.aliUserRequestDto(bean);
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone2);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("Alipay");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(Alipayid);
			
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("101", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机未绑定，账号已绑定", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_029() {
		Logger.start(true,"手机,weixin账号均已绑定不同账号,检查状态113");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String weixinid=TestDataManager.getRandomUUID().toString();
			
			WeiXinUserRequestDtoBean bean=JUserCallService.initWeiXinUserRequestDtoBean();
			bean.setUnionId(weixinid);
			bean.setMobile(phone);
			JUserCallService.weiXinUserRequestDto(bean);
			
			CreateUserReq cur2 = new CreateUserReq();
			cur2 = JUserCallService.initCreateUserBean(cur2);
			Integer uid2 = JUserCallService.createUserCall(cur2);
			String phone2 = cur2.getMobile();
			String weixinid2=TestDataManager.getRandomUUID().toString();
			
			WeiXinUserRequestDtoBean bean2=JUserCallService.initWeiXinUserRequestDtoBean();
			bean2.setUnionId(weixinid2);
			bean2.setMobile(phone2);
			JUserCallService.weiXinUserRequestDto(bean2);
			
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weixin");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weixinid2);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("113", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机已绑定，账号已绑定，不关联", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_030() {
		Logger.start(true,"手机,weibo账号均已绑定不同账号,检查状态113");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String weibo=TestDataManager.getRandomUUID().toString();
			
			SinaWeiBoUserRequestDtoBean bean=JUserCallService.initSinaWeiBoUserRequestDtoBean();
			bean.setSWeiboUserId(weibo);
			bean.setMobile(phone);
			JUserCallService.sinaWeiBoUserRequestDto(bean);
			
			
			CreateUserReq cur2 = new CreateUserReq();
			cur2 = JUserCallService.initCreateUserBean(cur2);
			Integer uid2 = JUserCallService.createUserCall(cur2);
			String phone2 = cur2.getMobile();
			String weibo2=TestDataManager.getRandomUUID().toString();
			
			SinaWeiBoUserRequestDtoBean bean2=JUserCallService.initSinaWeiBoUserRequestDtoBean();
			bean2.setSWeiboUserId(weibo2);
			bean2.setMobile(phone2);
			JUserCallService.sinaWeiBoUserRequestDto(bean2);
			
			
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("weibo");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(weibo2);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("113", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机已绑定，账号已绑定，不关联", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_CheckMobileCanBindThirdPartyUserDto_031() {
		Logger.start(true,"手机,ali账号均已绑定不同账号,检查状态113");
		try {
			CreateUserReq cur = new CreateUserReq();
			cur = JUserCallService.initCreateUserBean(cur);
			Integer uid = JUserCallService.createUserCall(cur);
			
			String phone = cur.getMobile();
			String Alipayid=TestDataManager.getRandomUUID().toString().replaceAll("-", "_");
			
			AliUserRequestDtoBean bean = JUserCallService.initAliUserRequestDtoBean();
			bean.setSAliUserId(Alipayid);
			bean.setMobile(phone);
			JUserCallService.aliUserRequestDto(bean);
			
			CreateUserReq cur2 = new CreateUserReq();
			cur2 = JUserCallService.initCreateUserBean(cur2);
			Integer uid2 = JUserCallService.createUserCall(cur2);
			String phone2 = cur2.getMobile();
			String ali2=TestDataManager.getRandomUUID().toString().replaceAll("-", "_");
			
			AliUserRequestDtoBean bean2 = JUserCallService.initAliUserRequestDtoBean();
			bean2.setSAliUserId(ali2);
			bean2.setMobile(phone2);
			JUserCallService.aliUserRequestDto(bean2);
			
			
			checkmobilecanbindthirdpartyuserdtoBean.setMobile(phone);
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyType("Alipay");
			checkmobilecanbindthirdpartyuserdtoBean.setThirdPartyId(ali2);
			checkmobilecanbindthirdpartyuserdtoCall.setData(checkmobilecanbindthirdpartyuserdtoBean);
			checkmobilecanbindthirdpartyuserdtoCall.callService();			
			Logger.verifyEquals("113", checkmobilecanbindthirdpartyuserdtoCall.getCode(), "验证Code");
			Logger.verifyEquals("手机已绑定，账号已绑定，不关联", checkmobilecanbindthirdpartyuserdtoCall.getMsg(), "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}